package com.hj.system.system.service;

import com.hj.system.base.utils.PageUtils;
import com.hj.system.system.domain.UserDO;
import com.hj.system.system.vo.UserVO;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@Service
public interface UserService {
    UserDO get(String id);

    PageUtils list(Map<String, Object> map);

    int save(UserDO user);

    int update(UserDO user);

    int remove(String userId);

    int batchRemove(String[] userIds);

    boolean exit(Map<String, Object> params);

    int resetPwd(UserVO userVO, UserDO userDO) throws Exception;

    int adminResetPwd(UserVO userVO) throws Exception;


    /**
     * 更新个人信息
     *
     * @param userDO
     * @return
     */
    int updatePersonal(UserDO userDO);

    /**
     * 更新个人图片
     *
     * @param file        图片
     * @param avatar_data 裁剪信息
     * @param userId      用户ID
     * @throws Exception
     */
    Map<String, Object> updatePersonalImg(MultipartFile file, String avatar_data, String userId) throws Exception;
}
